{include="header"}
{include="navigator"}

<div id = "container">
	<h1 class = "header">สร้างตัวบ่งชี้</h1>

	<form action = '{$action}' method = 'post' enctype='multipart/form-data' id = "assessment-form">
		<input type = "hidden" name = "id" value = "{$id}">
		<input type = "hidden" name = "aid" value = "{$aid}">
		<ul class = 'form'>
			<li class = 'node'>
				<label for='name' class = 'label'>ตัวบ่งชี้ที่ : </label>
				{$id}.
				<select name = "sub">
					{loop="sub"}
						{if="$value==$last"}
							<option value="{$value}" selected>{$value}</option>
						{else}
							<option value="{$value}">{$value}</option>
						{/if}
					{/loop}
				</select>
				<span class='require'>*</span>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='name' class = 'label'>ชื่อตัวบ่งชี้ : </label>
				<input type = 'text' id = 'name' class = 'input validate[required] text-input w300' name = 'name' value = "{$data['name']}">
				<span class='require'>*</span>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='target' class = 'label'>ประเภทตัวบ่งชี้ : </label>
				<select name = 'type'>
					<option value = '1' {if="$data['type'] == 1"} selected {/if}>กระบวนการ</option>
					<option value = '2' {if="$data['type'] == 2"} selected {/if}>ปัจจัยนำเข้า</option>
				</select>
				<span class = 'desc'></span>
			</li>
			<li>
				<input type = 'submit' value = ' ตกลง ' class = 'submit'>
				<input type = 'button' value = ' ยกเลิก ' class = 'submit' onclick = "location.href='assessment.php'">
				<input type = 'button' value = 'ลบตัวบ่งชี้' class = 'submit'  onclick = "location.href='assessment-delete.php?aid={$aid}'">
			</li>
		</ul>
	</form>
</div>

{include="footer"}